import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    port: 10101,
    proxy: {
      "/api": {
        target: "http://127.0.0.1:8080/",
        changeOrigin: true,
      },
      "/music": {
        target: "http://127.0.0.1:8080/",
        changeOrigin: true,
      },
      "/lyrics": {
        target: "http://127.0.0.1:8080/",
        changeOrigin: true,
      },
      "/cover": {
        target: "http://127.0.0.1:8080/",
        changeOrigin: true,
      },
    },
  },
});
